#pragma once 

#define SIZE 4096

//刷新策略
#define FLUSH_NONE 1//1
#define FLUSH_LINE (1<<1)//2
#define FLUSH_ALL  (1<<2)//4


typedef struct _myFILE
{
    int fileno;
    int flag;
    char buffer[SIZE];
    int end;
}myFILE;

//函数声明可以省略extern   变量不可以，因为分不清是定义还是声明
extern myFILE* my_fopen(const char* path, const char* mode);
extern int my_fwrite(const char* s,int num,myFILE* stream);
extern int my_fflush(myFILE* stream);
extern int my_fclose(myFILE* stream);


    
